/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: LianBao
 * Date: 2024-04-05
 * Time: 12:43
 */
public class Test {
    public static void main(String[] args) {
        BinaryTree tree = new BinaryTree();
        BinaryTree.TreeNode root = tree.root;
        root = tree.createTree();
        System.out.println("第k(3)层结点个数:\n" + tree.KLevelNodeCount(root, 3));
        System.out.println("树的结点个数:\n" + tree.NodeCount(root));
        System.out.println("叶子结点个数:\n" + tree.leafCount(root));
        System.out.println("树的高度:\n" +tree.getHeight(root));
        System.out.println(tree.find(root,"Z"));
    }
}
